package sunstar.com.xq.activity

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_image_check.*
import kotlinx.android.synthetic.main.activity_multi_image_info.*
import sunstar.com.xq.R
import sunstar.com.xq.adapter.ImageViewPagerAdapter
import sunstar.com.xq.databean.CardData

class ImageCheckActivity : BaseActivity() {
    override fun setBaseView(): Int =R.layout.activity_image_check

    override fun setTitleText(): String = ""

    override fun showTitle(): Boolean = false
    var adapter : ImageViewPagerAdapter?=null
    val imgList = mutableListOf<String>()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setView()
    }

    private fun setView() {
        var data = intent.getSerializableExtra("data") as CardData
        var finalString = data.cardImg.split(",")
        for (i in 0..finalString.size - 1) {
            imgList.add(finalString[i])
        }
        adapter = ImageViewPagerAdapter(this, imgList)
        image_check_vp.adapter = adapter
    }
}
